-
Notifications
You must be signed in to change notification settings - Fork 15
fix: Export ToolboxTool from toolbox-core for toolbox-langchain integration #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Just a curious question: Is there a way to say that it is not recommended to use classes like ToolboxTool? Something like protected methods in python. It is not impossible to use those but it is discouraged for the users to use the protected methods of classes. |
See https://stackoverflow.com/a/551048/28124314 Tldr; we can use underscores just like we use them with method/vars. Alternatively, we can put comments, just like we did here: mcp-toolbox-sdk-python/packages/toolbox-langchain/src/toolbox_langchain/async_tools.py Lines 33 to 35 in ca88369
Do you think we should make the IMO, I would keep it as is since people might want to use the class for playing around with the tool. Eg: from toolbox_core import ToolboxTool
tool: ToolboxTool = await client.load_tool("my-tool")
tool.bind_parameters(...)
result = await tool(...) CC: @kurtisvg |
I'm not sure I understand why we need to export ToolboxTool (although not necessarily opposed to it). Do we have an example of how we are using it that's causing problems? |
My main thinking behind proposing it was future flexibility:
But, thinking about it more, I agree it might be premature. It's likely most folks needing custom integration might just use So, makes sense to hold off. I'll close the PR for now to avoid exposing it unnecessarily. 👍 We can definitely reopen if a clear need pops up later! |
1f69ff5
to
4afccae
Compare
The
ToolboxTool
class withintoolbox-langchain
relies on importing theToolboxTool
class from the underlyingtoolbox-core
library.This change exports the
ToolboxTool
class fromtoolbox-core
, making it easier to access it fromtoolbox-langchain
.